<%--
  Created by IntelliJ IDEA.
  User: Winstars
  Date: 2007-4-8
  Time: 13:42:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Simple jsp page</title>
    <script type="text/javascript" src="scripts/prototype.js"></script>
    <script type="text/javascript" src="scripts/buffalo.js"></script>

    <script type="text/javascript">
        var END_POINT = "<%=request.getContextPath()%>/bfapp";
        var buffalo = new Buffalo(END_POINT);
        function hello() {
            var obj = $("myname").value;
            buffalo.remoteCall("buffaloService.hello", [obj], dealIt);
        }

        var dealIt = function(reply) {
            var result=reply.getResult();
            alert(result);
            $("submit").value=result;
        }
    </script>
</head>
<body>
<p>Place your content here</p>
    <input name="myname" type="text" id="myname"/>
    <input name="submit" type="submit" value="hello" onclick="hello();"/>
</body>
</html>